package com.wds.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.wds.domain.JsonResult;
import com.wds.domain.dto.ArticleAddDto;
import com.wds.domain.dto.ArticleUpdateDto;
import com.wds.domain.entity.Article;

import java.util.List;

/**
 * 文章表(Article)表服务接口
 *
 * @author wds
 * @since 2022-10-21 15:30:19
 */
public interface ArticleService extends IService<Article> {

    JsonResult<Object> hotArticleList();

    JsonResult<Object> articleList(Integer categoryId, int pageNum, int pageSize);

    JsonResult<Object> getArticleDetail(Long articleId);

    void updateViewCount(Long articleId);

    void updateViewCountToMysql(Long id, Long viewCount);

    JsonResult<Object> addNewArticle(ArticleAddDto dto);

    JsonResult<Object> listAllArticle(Integer pageNum, Integer pageSize, String title, String summary);

    JsonResult<Object> queryOne(Long id);

    JsonResult<Object> updateArticle(ArticleUpdateDto articleDto);

    JsonResult<Object> deleteArticle(List<Long> ids);
}

